<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" action="">

    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_id" data-rule="required" data-source="goods/index" class="form-control selectpage" name="row[goods_id]" type="text" value="{$row.goods_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Coupon_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-coupon_id" data-source="coupon/index" data-field="id" class="form-control selectpage" name="row[coupon_id]" type="text" value="{$row.coupon_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('User_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-user_id" data-rule="required" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[user_id]" type="text" value="{$row.user_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Distributor_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-distributor_id" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[distributor_id]" type="text" value="{$row.distributor_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Verifier_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-verifier_id" data-source="user/user/index" data-field="nickname" class="form-control selectpage" name="row[verifier_id]" type="text" value="{$row.verifier_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="statusList" item="vo"}
            <label for="row[status]-{$key}"><input id="row[status]-{$key}" name="row[status]" type="radio" value="{$key}" {in name="key" value="$row.status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payment_method')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="paymentMethodList" item="vo"}
            <label for="row[payment_method]-{$key}"><input id="row[payment_method]-{$key}" name="row[payment_method]" type="radio" value="{$key}" {in name="key" value="$row.payment_method"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payment_time')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-payment_time" class="form-control datetimepicker" data-date-format="YYYY-MM-DD HH:mm:ss" data-use-current="true" name="row[payment_time]" type="text" value="{:$row.payment_time?datetime($row.payment_time):''}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payment_amount')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-payment_amount" class="form-control" name="row[payment_amount]" type="text" value="{$row.payment_amount|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Payment_id')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-payment_id" class="form-control" name="row[payment_id]" type="text" value="{$row.payment_id|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Goods_price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-goods_price" class="form-control" step="0.01" name="row[goods_price]" type="number" value="{$row.goods_price|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Travel_date')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-travel_date" class="form-control datetimepicker" data-date-format="YYYY-MM-DD" data-use-current="true" name="row[travel_date]" type="text" value="{$row.travel_date}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tourists')}:</label>
        <div class="col-xs-12 col-sm-8">
            <!-- <input id="c-tourists" class="form-control" name="row[tourists]" type="text" value="{$row.tourists|htmlentities}"> -->
            <table class="table fieldlist" data-name="row[tourists]" data-template="row[tourists]tpl">
                <tr>
                    <td>{:__('Tourists name')}</td>
                    <td>{:__('Tourists type')}</td>
                    <td>{:__('Tourists id_num')}</td>
                    <!-- <td width="90">{:__('Operate')}</td> -->
                </tr>
                <tr><td colspan="5">
                <!-- <a href="javascript:;" class="btn btn-sm btn-success btn-append"><i class="fa fa-plus"></i> {:__('Append')}</a> -->
                <textarea name="row[tourists]" class="form-control hide" cols="30" rows="5">{$row.tourists|htmlentities}</textarea>
                </td></tr>
            </table>
            <script type="text/html" id="row[tourists]tpl">
                <tr>
                    <td><input type="text" name="<%=name%>[<%=index%>][name]" class="form-control" value="<%=row.name%>"/></td>
                    <td>
                        <input data-source='[{"id":"id_card","name":"身份证"},{"id":"passport","name":"护照"}]' class="form-control selectpage" name="<%=name%>[<%=index%>][type]" type="text" value="<%=row.type%>">
                    </td>
                    <td><input type="text" name="<%=name%>[<%=index%>][id_num]" class="form-control" value="<%=row.id_num%>"/></td>
                    <!-- <td width="90">
                        <span class="btn btn-sm btn-danger btn-remove"><i class="fa fa-times"></i></span>
                        <span class="btn btn-sm btn-primary btn-dragsort"><i class="fa fa-arrows"></i></span>
                    </td> -->
                </tr>
            </script>

        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Tourists_num')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-tourists_num" class="form-control" name="row[tourists_num]" type="number" value="{$row.tourists_num|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Contacts_name')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contacts_name" class="form-control" name="row[contacts_name]" type="text" value="{$row.contacts_name|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Contacts_mobile')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contacts_mobile" class="form-control" name="row[contacts_mobile]" type="number" value="{$row.contacts_mobile|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Contacts_area')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-contacts_area" class="form-control" name="row[contacts_area]" type="text" value="{$row.contacts_area|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Remarks')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="c-remarks" class="form-control" name="row[remarks]" type="text" value="{$row.remarks|htmlentities}">
        </div>
    </div>
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Review_status')}:</label>
        <div class="col-xs-12 col-sm-8">
            
            <div class="radio">
            {foreach name="reviewStatusList" item="vo"}
            <label for="row[review_status]-{$key}"><input id="row[review_status]-{$key}" name="row[review_status]" type="radio" value="{$key}" {in name="key" value="$row.review_status"}checked{/in} /> {$vo}</label> 
            {/foreach}
            </div>

        </div>
    </div>
    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
        </div>
    </div>
</form>
